<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ include file="/WEB-INF/views/include/constrant.jsp"%>
<html>
<head>
	<title>订单一览</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n, s) {
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
			return false;
		}
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/cusmanage/tCusManage/list">客户管理</a></li>
	</ul>
	<form:form id="searchForm" action="${ctx}/cusmanage/tCusManage/list" modelAttribute="TOrders" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<table class="table table-condensed" style="width: 100%;">
		<tr class="success"><td>
		<ul class="ul-form">
			<li>
				<span><label>联系人：</label></span>
				<form:input path="contacts" class="input-medium"/>
			</li>
			<%-- <li>
				<span><label>订单号：</label></span>
				<form:input path="orderid" class="input-medium"/>
			</li>--%>
			<li>
				<span><label>&nbsp;&nbsp;日期：</label></span>
				<input type="text" id="createDateQueryStart" name="createDateQueryStart" maxlength="20" readonly class="input-small Wdate"
					value="${tOrders.createDateQueryStart }"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,maxDate:'#F{$dp.$D(\'createDateQueryEnd\')}'});"/>
				至&nbsp;
				<input type="text" id="createDateQueryEnd" name="createDateQueryEnd" maxlength="20" readonly class="input-small Wdate"
					value="${tOrders.createDateQueryEnd }"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,minDate:'#F{$dp.$D(\'createDateQueryStart\')}'});"/>
			</li> 
			<li class="btns">
				<input class="btn btn-primary btn-success" type="submit" value="查询"/>
			</li>
			<li class="clearfix"></li>
		</ul>
		</td></tr>
	</table>
	</form:form>
	<sys:message content="${message}"/>
	<table class="table table-striped table-bordered table-condensed">
		<thead>
			<tr class="success">
				<!-- <th>订单号</th>
				<th>线路</th>
				<th>时间</th>
				<th>金额</th> -->
				<th>用车单位</th>
				<th>联系人</th>
				<th>联系方式</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${list}" var="orders">
			<tr>
				<%-- <td>${orders.orderid }</td>
				<td>${orders.ordername }</td>
				<td><fmt:formatDate value="${orders.createDate }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
				<td>￥${orders.dueamount}</td> --%>
				<td>
					<c:if test="${empty orders.clientname }">霞客约车</c:if>
					<c:if test="${!empty orders.clientname }">${orders.clientname}</c:if>
				</td>
				<td>${orders.contacts}</td>
				<td>${orders.payertel}</td>
			</tr>
			</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>